import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main
from util import *
from dungeon import makeFloor, Room, TemplateRoom
import dungeon

template = \
"""
##########
#*      *#
# o    o #
#  x  x  #
#  x  x  #
#  x  x  #
# o    o #
#*      *#
##########
"""[1:]

legend = {
    'x':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('mess table', 100, parole.map.AsciiTile('=',
                colors['SaddleBrown'], bg_rgb=colors['SaddleBrown']),
                blockMove=True), clearFirst=False),
            
    'o':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('wooden support pillar', 100, parole.map.AsciiTile('o',
                colors['SaddleBrown']),
                blockMove=True, blockLOS=True), clearFirst=False),

    '*':    parole.map.MapObjectGenerator("",
            lambda: dungeon.Brazier(), clearFirst=False),

    '#':    dungeon.rockGenerator(colors['Gray']),
}

floorColor1 = colors['SandyBrown']
floorColor2 = colors['SaddleBrown']
floorName = 'dirt floor'
mixture = 0.5

diggable = [
    (4,0), 
    (4,8),
    (0,7),
    (9,4),
]

class MessHall(TemplateRoom):
    def __init__(self, pos):
        TemplateRoom.__init__(self, template, legend, diggable, pos,
                floorColor1, floorColor2, mixture, floorName)


roomClass = MessHall
